<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>背景大小</title>
		<style>
			#d1{
				background-color: blueviolet;
				height: 400px;
				background-image: url("../image/icon.png");
				background-position: center center; 
				background-repeat: no-repeat;
				/* background-size: 100px 100px; */
				/* background-size: 40% 40%; */
				/* background-size: cover; */
				background-size: contain;
			}
		</style>
	</head>
	<body>
		<div id="d1"></div>
	</body>
</html>